package com.two.screen.water.balance.widget

import android.content.Context
import android.util.AttributeSet
import cn.jzvd.JzvdStd

class MyJZVideoPlayer : JzvdStd {
    constructor(context: Context?) : super(context) {}
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {}

    override fun onStateAutoComplete() {
        super.onStateAutoComplete()
        mMyJZVideoPlayerListener?.onPlayComplete()
    }

    override fun onStatePlaying() {
        mMyJZVideoPlayerListener?.onStartPlay()
        super.onStatePlaying()
    }

    override fun changeUiToPauseShow() {
        mMyJZVideoPlayerListener?.onPausePlay()
        super.changeUiToPauseShow()
    }

   // override fun showWifiDialog() {}

    var mMyJZVideoPlayerListener: MyJZVideoPlayerListener? = null

}

interface MyJZVideoPlayerListener {
    fun onStartPlay()
    fun onPausePlay()
    fun onPlayComplete()
}
